#include <iostream>

#define Max_Queue_Size 100
#define Status int
#define OK 1
#define Fail 0
#define ElemType int
using namespace std;

typedef struct QueueNode {
    ElemType data;
    struct QueueNode *next;
};

typedef struct Queue {
    struct QueueNode *front;
    struct QueueNode *rear;

    Status Push(int e) {
        QueueNode *node = new QueueNode;
        node->data = e;
        rear->next = node;
        rear = node;
        return OK;
    }

    Status Pop(int &e) {
        e = front->next->data;
        front = front->next;
        return OK;
    }

    Status IsEmpty() { return front == rear; }
};

Status CreateQueue(Queue *&q) {
    q = new Queue;
    q->front = new QueueNode;
    q->front->next = NULL;
    q->rear = q->front;
    return OK;
}

int main() {
    Queue *q;
    ElemType e;
    CreateQueue(q);
    q->Push(123);
    q->Push(234);
    q->Push(345);
    q->Push(456);
    return 0;
}
